#include "Gate.h"

#include "Game.h"
#include "Player.h"


Gate::Gate(int x, int y):
	Door(x, y, Player::InventoryItem_GateKey)
{
}


Gate::~Gate()
{
}


void Gate::handleCollision(GameObject* gameObject)
{
	if (gameObject->getType() == Type_Player)
	{
		static_cast<Player*>(gameObject)->removeFromInventory(keyType);
		Game::getInstance()->dungeonOver("Congratulations! You escaped the dungeon!", true);
	}
}
